package action.entrenador.reporte;

import DBMS.DataBaseManager;
import clases.InasistenciaForm;
import clases.RegistroDeportistaForm;
import clases.busquedaForm;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

import ve.usb.cohesion.runtime.CohesionAction;


/**
 * 
 */
public class AccionesGenerarReporteEntrenador extends CohesionAction {
    
/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Generar_Reporte.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Generar_Reporte(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        //Salidas
        final String[] SALIDAS = {"V_Generar_Reporte_Entrenador", };
        final int SALIDA_0 = 0;

        int salida = SALIDA_0;
        

        return mapping.findForward(SALIDAS[salida]);
    }

/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Listar_Horarios.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Listar_Horarios(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        //Salidas
        final String[] SALIDAS = {"V_Listar_Horarios_Entrena", };
        final int SALIDA_0 = 0;

        int salida = SALIDA_0;
        

        return mapping.findForward(SALIDAS[salida]);
    }

/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Listar_Asistencia.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Listar_Asistencia(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        //Salidas
        final String[] SALIDAS = {"V_Listar_Asistencia", };
        final int SALIDA_0 = 0;
        
        int salida = SALIDA_0;
        
        DataBaseManager dbms = DataBaseManager.getInstance();
        ArrayList<String> Disciplinas = dbms.CargarDisciplinasPropias((String)request.getSession().getAttribute("Login"));    
        request.getSession().setAttribute("MDisc",Disciplinas);
        return mapping.findForward(SALIDAS[salida]);
    }

/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Listar_Inasistencia.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Listar_Inasistencia(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
       
        final String[] SALIDAS = {"V_Listar_Inasistencia", };
        final int SALIDA_0 = 0;

        int salida = SALIDA_0;
        
        return mapping.findForward(SALIDAS[salida]);
    }


/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Volver_Gen_Reporte.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Volver_Gen_Reporte(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        //Salidas
        final String[] SALIDAS = {"V_Generar_Reporte_Entrenador", };
        final int SALIDA_0 = 0;

        int salida = SALIDA_0;
        

        return mapping.findForward(SALIDAS[salida]);
    }

/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Seleccionar_Fecha_Inasist.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Seleccionar_Fecha_Inasist(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        busquedaForm b = (busquedaForm) form;
        final String[] SALIDAS = {"V_Seleccionar_Fecha_Inasist", };
        final int SALIDA_0 = 0;
        int salida = SALIDA_0;
        DataBaseManager dbms = DataBaseManager.getInstance();
        ArrayList<InasistenciaForm> Inasis = dbms.cargarInasistencias(b,(String)request.getSession().getAttribute("Login"));
        request.getSession().setAttribute("inasis",Inasis);

        return mapping.findForward(SALIDAS[salida]);
    }


/**
     * Acci??n llamada por Struts para ejecutar la acci??n A_Seleccionar_Disciplina_Fecha.
     * 
     * @param mapping The ActionMapping used to select this instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward A_Seleccionar_Disciplina_Fecha(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        //Salidas
        final String[] SALIDAS = {"V_Seleccionar_Disciplina_Fecha", };
        final int SALIDA_0 = 0;

        int salida = SALIDA_0;
        

        return mapping.findForward(SALIDAS[salida]);
    }



}